17. Exercise: See More FavoriteToys

See More FavoriteToys Exercise

See More FavoriteToys

In this exercise, you'll add a ScrollView so you can see more of the toy list.

Exercise Code

Exercise: T01.03-Exercise-AddScrolling

Exercise Three: See More FavoriteToys

Open Exercise 3 and complete all the TODOs.

SOLUTION:
  • Add a ScrollView as a child of the FrameLayout in the layout editor (using either the visual tool or XML)
  • Set the height of the new ScrollView to wrap_content and the width to match_parent
  • Move the existing tv_toy_names TextView inside of our ScrollView
  • Rejoice at the lovely scrolling we get.